import { Controller, Get } from '@nestjs/common';
import { AppService } from './app.service';
import { User } from '@monorepo/shared-types';
import { createApiResponse } from '@monorepo/shared-utils';

@Controller()
export class AppController {
  constructor(private readonly appService: AppService) {}

  @Get()
  getHello(): string {
    return this.appService.getHello();
  }

  @Get('users')
  getUsers() {
    const users: User[] = this.appService.getUsers();
    return createApiResponse(users, true, 'Users fetched successfully');
  }
} 